﻿<UserControl x:Class="Hisaab.Client.Modules.Core.Management.View.OptionView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Style="{DynamicResource BackStageControl}"
             xmlns:ribbon="clr-namespace:Fluent;assembly=Fluent" 
             xmlns:h="clr-namespace:Hisaab.Client.Common.Helpers;assembly=Hisaab.Client.Common"             
             mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:Common="clr-namespace:Hisaab.Common;assembly=Hisaab.Common"
             xmlns:Converters="clr-namespace:Hisaab.Client.Common.Converters;assembly=Hisaab.Client.Common"
             d:DesignHeight="473" d:DesignWidth="789">
    <UserControl.Resources>
        <Converters:CurrencyToSymbolConverter x:Key="CurrencyImageConverter"/>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="500" />
        </Grid.ColumnDefinitions>
    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <Image  VerticalAlignment="Center" Stretch="None" Source="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/48/Options.png" Width="48" Height="48" />
            <Label Content="Options" VerticalContentAlignment="Center" Style="{DynamicResource BackstageLabelBig}" />
        </StackPanel>
            <Label Content="Currency" Style="{DynamicResource BackstageLabel}" Margin="0,30,0,0" />
            <ribbon:ComboBox HorizontalAlignment="Left" ItemsSource="{Binding Source={h:Enumeration {x:Type Common:Currency}}}" SelectedValue="{Binding CurrencySymbol}" SelectedValuePath="Value">
                <ribbon:ComboBox.ItemTemplate>
                        <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Margin="4" Source="{Binding Value, Converter={StaticResource CurrencyImageConverter}}" Stretch="None" />
                            <TextBlock Text="{Binding Description}" VerticalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                    </ribbon:ComboBox.ItemTemplate>
            </ribbon:ComboBox>
        <ribbon:Button Style="{DynamicResource ButtonBackstageStyle}" Command="{Binding UpdateCommand}"
                       LargeIcon="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/32/Save.png" HorizontalAlignment="Left" Margin="0,30,0,0">Save</ribbon:Button>
    </StackPanel>
    </Grid>
</UserControl>